home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / lbn.lqr / lbn.lbr / lbn.doc < prev   
Text File  |  2011-02-01  |  3KB  |  92 lines

  1. LBN - A Line By Number listing utility for C programs
  2.  
  3. System Requirements: IBM-PC ( possibly Z100 )
  4.  
  5.  
  6. LBN is a list utility which was designed to assist in locating curly-brace
  7. mis-matched in C programs and to flag the existence of unbalanced pairs of
  8. parentheses and single and double quotes. Line numbering assists in finding
  9. lines in error as indicated by error ouputs from most C compilers, while
  10. curly brace checking makes localization of mis-matches relatively simple.
  11. Curly brace underflow is most obvious as is the indication of a nesting
  12. level after what should logically be the termination of a function.
  13.  
  14.  
  15. The following is an example of
  16. the output produced by this utility:
  17.  
  18. LINE  DEPTH     SOURCE STATEMENTS     01:06:21 PM     08 JAN 1984    SORT.C     PAGE  1.0
  19.  
  20.  
  21.   58            sort( in, fname )
  22.   59            FILE *in;
  23.   60            char *fname;
  24.   61            {
  25.   62  _            int nlines;
  26.   63  _         
  27.   64  _            if( (nlines=readlines(in)) > 0 ) {
  28.   65  __               sortlines( 0, nlines-1 );
  29.   66  __               printlines( stdout, nlines );
  30.   67  __            }
  31.   68  _             else if( nlines < 0 )
  32.   69  _               fprintf(stderr, "sort: file is too large: %s\n", fname );
  33.   70  _         
  34.   71  _         } /* end sort */
  35.   72            
  36.  
  37. If errors conditions are detected any or all of the following warning
  38. messages are appended to the list output:
  39.  
  40.     lbn: *WARNING* Braces mismatch. [x] unmatched [{ | }].
  41.     lbn: *WARNING* Braces depth went negative.
  42.     lbn: *WARNING* Parenthesis mismatch. [x] unmatched [( | )].
  43.         lbn: *WARNING* Parenthesis depth went negative.
  44.     lbn: *WARNING* Single quote mismatch.
  45.     lbn: *WARNING* Double quote mismatch.
  46.  
  47.  
  48. LBN is invoked using the following command line:
  49.  
  50.     lbn [ -c <char> ] fname.ext [ >fname.ext or device ]
  51.  
  52.     Examples:  
  53.            LBN
  54.  
  55.            this invokation elicits the following usage message:
  56.  
  57.            usage: lbn [ -c <char> ] fname.ext [ >fname.ext or device ]
  58.                   where: <char> is a user-specified
  59.                           profiling symbol ... the standard
  60.                           symbol is an underscore
  61.  
  62.            LBN sort.c
  63.  
  64.            this invokation would list sort.c to the console.
  65.  
  66.            LBN sort.c >LPT1:
  67.  
  68.            this invokation would list sort.c directly to the
  69.            line printer device.
  70.  
  71.            LBN sort.c >sort.lbn
  72.  
  73.            this invokation would list sort.c to a disk file named
  74.            'sort.lbn'.
  75.  
  76.            LBN sort.c -c * >sort.lbn
  77.  
  78.            this invokation would change the profiling character from
  79.            the standard underscore for an asterisk and list sort.c
  80.            to a disk file name 'sort.lbn'.
  81.  
  82.  
  83. It should be noted that the I/O redirection currently supported by this
  84. utility is << NOT >> compatible with that supported by MSDOS 2.0.
  85.  
  86. Page numbering, which has the format  'x.y', in the generated listing
  87. is influenced by two factors: embedded formfeed characters and the page
  88. line count.  the primary page number ( x ) is incremented by embedded
  89. FF's while the secondary page count ( y ) is incremented each time LBN
  90. generates an internal page break. Note that embedded FF's are honored.
  91.  
  92.